import { useAuthStore } from '@/stores/authStore';
export default function (router: any) {
  function goHome() {
    router.push({ name: "level" });
  }
  function goOrder() {
    router.push({ name: "order.default" });
  }
  function goMember() {
    router.push({ name: "member.default" });
  }
  function goStaff() {
    router.push({ name: "staff.default" });
  }
  function goCreateOrder() {
    router.push({ name: "create" });
  }
  function goShop() {
    router.push({ name: "shop.default" });
  }
  function goStatistics() {
    router.push({ name: "statistics.default" });
  }
  function exit() {
    const authStore = useAuthStore()
    router.push({ name: "login" });
    authStore.clearToken();
  }
  function goPermission() {
    router.push({ name: "permission.default" });
  }
  return { goHome, goOrder, goMember, goStaff, goCreateOrder, goShop, goStatistics, goPermission, exit }
}
